#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_exam1.py
# author:王雯雯
# datetime:2024-11-12 
# software: PyCharm

class StudentWithScores:
    def __init__(self, name, age, gender, english_score, math_score, chinese_score):
        self.name = name
        self.age = age
        self.gender = gender
        self.english_score = english_score
        self.math_score = math_score
        self.chinese_score = chinese_score

    def total_score(self):

        return self.english_score + self.math_score + self.chinese_score

    def average_score(self):

        return self.total_score() / 3

    def print_student_info(self):

        print(f"姓名: {self.name}, 年龄: {self.age}, 性别: {self.gender}, 英语成绩: {self.english_score}, "
              f"数学成绩: {self.math_score}, 语文成绩: {self.chinese_score}, 总分: {self.total_score()}, "
              f"平均分: {self.average_score()}")